Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework xeno guaranteed slots logic and Fix thunderdome evolution slot bug #4206

Merged
merged 4 commits into from
Sep 16, 2023

Conversation

Drulikar
Copy link
Contributor

@Drulikar Drulikar commented Aug 18, 2023

About the pull request

This PR reworks the logic regarding guaranteed xeno slots. Before, the issue was that there was a discrepancy between gibbing/deletion and regular death (meaning not getting gibbed wouldn't free up a free slot). Now that logic is unified via using hive.remove_xeno and the used_free_slots now is just a count of slots used for a caste rather than trying to keep the calculation always correct. This avoids the messiness of handing the free slot usage to say the other burrower when there are two rather than one then freeing a slot.

Additionally, I encountered a bug during testing where evolution in the thunderdome would alter a hive's slots (and the effect would only show in hive_status after a xeno count update on add/removal), but that is also resolved.

See Testing section below to confirm logic, see reproduction for the t-dome fix, and then retesting.

Explain why it's good for the game

Should fix #398

Testing Photographs and Procedure

Steps 1-9:

1: Initial hive spawned in:
1

2: Evo a drone to burrower (free slot used):
2

3: Evo another drone to burrower (tier 2 slot used):
3

4: First burrower is killed:
4

5: Second burrower is gibbed:
5

6: Evo another drone to burrower (free slot used - I also tried deleting the burrower corpse afterwards to see if it affected anything):
6

7: Evo a drone to hivelord (free slot used):
7

8: Spawned a carrier and drone in t-dome, and evolved that drone to carrier (no effect on hive slots):
8

9: Killed and gibbed the t-dome carriers (no effect on hive slots):
9


Steps 10-14 Before thunderdome fix:

10: !! De-evolve a drone to larva (t2 slots went down - unintended): !!
10

11: !! Evolve larva to runner (no effect on hive slots - unintended or should have restored to slot counts in previous step): !!
11

12: Evolve runner to lurker and correctly failed attempt to evolve to ravager (t2 slot used):
12

13: Evolve another drone to burrower (last tier 2 slot used):
13

14: Correctly failed attempt to evolve to hivelord, but successful evolution from drone to carrier (last guaranteed slot used):
14


Steps 10-15 After thunderdome fix:

Steps 1-9 are identical.

10: De-evolve a drone to larva (correctly didn't change slot values because of tdome evolution):
new10

11: Evolve larva to runner (no effect on slots):
new11

12: Evolve runner to lurker and correctly failed attempt to evolve to ravager (t2 slot used):
new12

13: Evolve another drone to burrower (tier 2 slot used):
new13

14: Evolve another drone to burrower (last tier 2 slot used):
new14

15: Correctly failed attempt to evolve to hivelord, but successful evolution from drone to carrier (last guaranteed slot used):
new15

Changelog

🆑 Drathek
fix: Fix/Rework logic regarding xeno guaranteed slots
fix: Fix evolution in thunder dome affecting hive slots
/:cl:

@github-actions github-actions bot added the Fix Fix one bug, make ten more label Aug 18, 2023
@morrowwolf morrowwolf marked this pull request as draft September 9, 2023 03:27
@Drulikar Drulikar marked this pull request as ready for review September 9, 2023 18:28
@harryob harryob added this pull request to the merge queue Sep 16, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 16, 2023
@harryob harryob added this pull request to the merge queue Sep 16, 2023
@harryob
Copy link
Member

harryob commented Sep 16, 2023

dont question me robot

Merged via the queue into cmss13-devs:master with commit b7ec827 Sep 16, 2023
26 checks passed
cm13-github added a commit that referenced this pull request Sep 16, 2023
@Drulikar Drulikar deleted the Fix_Guaranteed_Slots branch September 16, 2023 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Fix one bug, make ten more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing drone caste T2 guaranteed slot
3 participants